<title>我的资料</title>

<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">主页</a>
    <a><cite>设置</cite></a>
    <a><cite>我的资料</cite></a>
  </div>
</div>

<div class="layui-col-xs12 layui-col-sm8 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset2">
  <div class="layui-field-box">
    <div class="layui-card">
      <div class="layui-card-header">设置我的资料</div>
      <div class="layui-card-body">
        <div class="layui-form layui-form-pane" action="" lay-filter="userform" style="padding: 20px;">
          <script type="text/html" template>
            {{#
              if(layui.data(layui.setter.tableName).user_face){
                layui.admin.popup({
                  content: '使用快捷登录系统的用户<br>如果你从未修改过密码那么你的当前密码为你的用户名'
                  ,area: '300px'
                  ,shade: false
                });
             } }}
            <div class="layui-form-item"><label class="layui-form-label">用户名</label>
              <div class="layui-input-block"><input type="text" name="user" lay-verify="required|user"
                  lay-reqText="用户名不能为空！" autocomplete="off" placeholder="输入你的用户名（必填）" lay-verType="tips"
                  value="{{ layui.data(layui.setter.tableName).user_user }}" class="layui-input"></div>
            </div>
          </script>
          <div class="layui-form-item"><label class="layui-form-label">当前密码</label>
            <div class="layui-input-block"><input type="password" name="oldpass" lay-verify="required|pass"
                lay-reqText="当前密码不能为空！" autocomplete="off" placeholder="请输入当前的登录密码" lay-verType="tips"
                class="layui-input"></div>
          </div>
          <div class="layui-form-item"><label class="layui-form-label">新密码</label>
            <div class="layui-input-block"><input type="password" name="newpass" lay-verify="pass" autocomplete="off"
                id="LAY_password" placeholder="不修改请留空" lay-verType="tips" class="layui-input"></div>
          </div>
          <div class="layui-form-item"><label class="layui-form-label">确认新密码</label>
            <div class="layui-input-block"><input type="password" name="resetpass" lay-verify="repass"
                autocomplete="off" placeholder="不修改请留空" lay-verType="tips" class="layui-input"></div>
          </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <div class="layui-col-xs8 layui-col-md6 layui-col-md-offset2"><button type="submit"
                  class="layui-btn layui-btn-default layui-btn-fluid" lay-submit="" lay-filter="save_user">修改</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="layui-col-xs12 layui-col-sm8 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset2">
  <div class="layui-field-box">
    <div class="layui-card">
      <div class="layui-card-header">绑定我的邮箱</div>
      <div class="layui-card-body">
        <h2 id="bind_mail">当前绑定：example@example.com</h2>
        <p>绑定邮箱的好处：实时接收活动、站点状态，使用邮箱进行快捷登录以及忘记密码等功能</p>
        <div class="layui-form layui-form-pane" action="" lay-filter="mailform" style="padding: 10px;">
          <script type="text/html" template>
            <div class="layui-form-item"><label class="layui-form-label">新的邮箱</label>
              <div class="layui-input-block"><input type="text" name="mail" lay-verify="required|email"
                  lay-reqText="邮箱地址不能为空！" id="LAY-user-mail-mail" autocomplete="off" placeholder="输入你的邮箱地址（必填）"
                  lay-verType="tips" value="" class="layui-input"></div>
            </div>
          </script>
          <div class="layui-form-item"><label class="layui-form-label">当前密码</label>
            <div class="layui-input-block"><input type="password" name="password" lay-verify="required|pass"
                lay-reqText="当前密码不能为空！" id="LAY-user-mail-pass" autocomplete="off" placeholder="请输入当前的登录密码"
                lay-verType="tips" class="layui-input"></div>
          </div>
          <div class="layui-form-item">
            <div class="layui-row">
              <div class="layui-col-xs8">
                <label class="layui-form-label">验证码</label>
                <div class="layui-input-block">
                  <input type="number" name="vercode" id="LAY-user-mail-vercode" lay-verify="required|regcaptcha"
                    autocomplete="off" placeholder="邮箱发来的验证码" class="layui-input">
                </div>
              </div>
              <div class="layui-col-xs4">
                <div style="margin-left: 5px;">
                  <button type="button" class="layui-btn layui-btn-primary layui-btn-fluid"
                    id="LAY-user-mail-getsmscode">获取验证码</button>
                </div>
              </div>
            </div>
          </div>

          <div class="layui-form-item">
            <div class="layui-input-block">
              <div class="layui-col-xs8 layui-col-md6 layui-col-md-offset2"><button type="submit"
                  class="layui-btn layui-btn-default layui-btn-fluid" lay-submit="" lay-filter="save_mail">绑定</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="layui-col-xs12 layui-col-sm8 layui-col-md8 layui-col-md-offset2 layui-col-sm-offset2">
  <div class="layui-field-box">
    <div class="layui-card">
      <div class="layui-card-header">绑定快捷登录</div>
      <div class="layui-card-body">
        <div class="layui-row">
          <div class="layui-col-xs3 layui-col-sm2 layui-col-md2 layui-col-lg1">
            <div class="layui-inline">
              <img src="../assets/img/logo.png" class="layui-circle" id="user_face" style="height: 75%; width: 75%;">
            </div>
          </div>
          <div class="layui-col-xs9 layui-col-sm10 layui-col-md10 layui-col-lg11">
            <strong id="user_name">正在加载名称...</strong>
            <p>绑定类型：<text id="user_oauth_type">未知
              </text>&nbsp;&nbsp;(点击下方图标即可绑定或换绑)</p>
          </div>
          <div class="layui-col-xs12" style="margin-top: 20px;">
            <a href="javascript:oauthlogin('qq');"><i class="layui-icon layui-icon-login-qq"
                style="font-size: 30px;"></i></a>
            <a href="javascript:oauthlogin('wx');"><i class="layui-icon layui-icon-login-wechat"
                style="font-size: 30px;"></i></a>
            <a href="javascript:oauthlogin('wb');"><i class="layui-icon layui-icon-login-weibo"
                style="font-size: 30px;"></i></a>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
  layui.use('info', layui.factory('info'));
</script>